﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace ihongma.Web.webserver
{
    /// <summary>
    /// addserver 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消对下行的注释。
    // [System.Web.Script.Services.ScriptService]
    public class addserver : System.Web.Services.WebService
    {

        [WebMethod]
        public  bool addnews(Model.article model,string pwd)
        {
            bool result = true;
            if (pwd == "s123456")
            {
                BLL.article bll = new BLL.article();

                bll.Add(model);
            }
            return result;
        }
        [WebMethod]
        public  bool addpic(Model.photo model, string pwd)
        {
            bool result = true;
            if (pwd == "s123456")
            {
                ihongma.BLL.photo bll = new BLL.photo();

                bll.Add(model);
            }
            return result;
        }
        [WebMethod]
        public bool addajax(Model.ajax model, string pwd)
        {
            bool result = true;
            if (pwd == "s123456")
            {
                ihongma.BLL.ajax bll = new BLL.ajax();

                bll.Add(model);
            }
            return result;
        }
          [WebMethod]
        public int ajaxtitle(string titele,string pwd)
        {
            int result = 0;
            if (pwd == "s123456")
            {
                ihongma.BLL.ajax bll = new BLL.ajax();

                result = bll.GetRecordCount("name="+titele);
            }
            return result;
        }
    }
}
